﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace INSTA.BankSystem.DAL
{
    public abstract class AbstractDbAccessor
    {
        private DataMapper _mappedObject;
        protected string _connectionString;

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="connectionString">The connection string.</param>
        /// <param name="mappedObject">The mapped object.</param>
        protected AbstractDbAccessor(string connectionString, DataMapper mappedObject)
        {
            _mappedObject       = mappedObject;
            _connectionString   = connectionString;

        }
        /// <summary>
        /// Gets the SQL generator.
        /// </summary>
        public AbstractSqlGenerator SqlGenerator { get; protected set; }

        public DataMapper MappedObject
        {
            get             { return _mappedObject; }
            protected set   { _mappedObject = value; }
        }
    }
}
